# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=ksystemlog
pkgver=23.08.4
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://apps.kde.org/ksystemlog/"
pkgdesc="KDE SystemLog Application"
license="GPL-2.0-or-later AND BSD-3-Clause"
depends_dev="
	audit-dev
	karchive5-dev
	kcompletion5-dev
	kconfig5-dev
	kcoreaddons5-dev
	kdoctools5-dev
	ki18n5-dev
	kio5-dev
	kitemviews5-dev
	ktextwidgets5-dev
	kwidgetsaddons5-dev
	kxmlgui5-dev
	qt5-qtbase-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-lang $pkgname-doc"
_repo_url="https://invent.kde.org/system/ksystemlog.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/ksystemlog-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
95ca75043324d40c2dffa6153ac79fd50cd7461ee699b848e516b75c6eef8a9e9961b9457e970a41e1bb5792532424f5568fb402db24088a63eccae19c613a63  ksystemlog-23.08.4.tar.xz
"
